home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / Bonus / VCLZip / kpdemosd.exe / Streams / FileDlg.Pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-11-26  |  677 b   |  41 lines

  1. unit FileDlg;
  2.  
  3. interface
  4.  
  5. uses
  6. {$IFDEF WIN32}
  7.   Windows,
  8. {$ELSE}
  9.   WinTypes, WinProcs,
  10. {$ENDIF}
  11.  SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  12.   Buttons, ExtCtrls;
  13.  
  14. type
  15.   TFileDialog = class(TForm)
  16.     OKBtn: TButton;
  17.     CancelBtn: TButton;
  18.     Bevel1: TBevel;
  19.     FileBox: TListBox;
  20.     SelectedFile: TEdit;
  21.     procedure FileBoxClick(Sender: TObject);
  22.   private
  23.     { Private declarations }
  24.   public
  25.     { Public declarations }
  26.   end;
  27.  
  28. var
  29.   FileDialog: TFileDialog;
  30.  
  31. implementation
  32.  
  33. {$R *.DFM}
  34.  
  35. procedure TFileDialog.FileBoxClick(Sender: TObject);
  36. begin
  37.   SelectedFile.Text := FileBox.Items[FileBox.ItemIndex];
  38. end;
  39.  
  40. end.
  41.